<template>
    <div>
        <el-form ref="addform" label-width="160px">
            <el-row>
                <el-col :span="16">
                    <el-form-item label="标题:">
                        {{detailModel.title}}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="16">
                    <el-form-item label="内容:">
                        {{detailModel.content}}
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="24">
                    <el-form-item label="图片:">
                        <el-image class="elimg" v-for="url in imageUrlList" :key="url" :src="url" :preview-src-list="imageUrlList">
                            <div slot="error" class="image-slot">
                                <i class="el-icon-picture-outline"></i>
                            </div>
                        </el-image>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <div class="text-center">
            <el-button type="danger" @click="backList">返回</el-button>
        </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
      detailModel: {},
      imageUrlList: []
    };
  },
  created() {
    this.initData();
  },
  methods: {
    initData() {
      this.detailModel = this.$route.query.data;
      this.imageUrlList = this.common.setElImage(this.detailModel.fileinfo);
    },

    backList() {
      this.$router.push({
        path: "/notice/index"
      });
    }
  }
};
</script>
